var fetch6 = function (pageIndex, callback) {
  pageIndex = pageIndex || 1
  //nocturnalAbnormalActivityTable	夜间异常活动/夜间频繁活动
  $.ajax({
    type: 'GET',
    url: personInfo.ajaxUrl[0].page(pageIndex, 10),
    beforeSend: function (xhr) {
      xhr.setRequestHeader('Authorization', tokenPgAuth);
      xhr.setRequestHeader('Accept-Profile', 'api-ailock-analysis-v1');
      xhr.setRequestHeader('Prefer', 'count=exact');
    }

  }).done(function (response,type,request1) {
    personInfo.total[0] = pgApiUtils.getTotal(request1); //总数
    $('.' + personInfo.totalDomId[0] + 1).text(personInfo.total[0])
    $('#' + personInfo.totalDomId[0] + 2).text(personInfo.total[0])
    var options = {
      bDestroy: true,
      searching: false,
      bPaginate: true,//表格分页
      bSort: false,
      bLengthMenu: false,
      bInfo: false,
      pageLength: 10, // 每页显示数量
      bAutoWidth: false,
      bLengthChange: false,
      bProcessing: true,
      pgAiDisplayLength:personInfo.total[0],
      data: response,
      fnPageChange: function (settings) {
        changePage(settings, '.nocturnalAbnormalActivityTable',1, personInfo)
      },
      columns: [
        {
          data: "name",
          bSortable: false,
          className: 'ta',
          render: function (data, type, full, meta) {
            if (!data) data = '--';
            return data
          }
        },
        {
          data: "phone",
          class: 'digit ta',
          bSortable: false,
          render: function (data, type, full, meta) {
            if (!data) data = '--';
            return data
          }
        },
        {
          data: "detailaddr",
          class: 'address',
          bSortable: false,
          render: function (data, type, full, meta) {
            if (!data) data = '--';
            return data
          }
        },
        {
          data: "housenumber",
          align: 'left',
          className: 'ta',
          bSortable: false,
          render: function (data, type, full, meta) {
            if (!data) data = '--';
            return data
          }
        }
      ],
    };
    options.fnInitComplete = function (settings) {
        var myOptions = jQuery.extend(options, {
          fnPageChange: function (settings) {
            changePage(settings, '.nocturnalAbnormalActivityTable', 0, personInfo)
          },
          fnInitComplete: function (settings) {
            personInfo.bindEvent[0]()
          }
        });
      personInfo.tables[0][1] = $('.nocturnalAbnormalActivityTable').eq(1).dataTable(myOptions);
    }

    personInfo.tables[0][0] = $('.nocturnalAbnormalActivityTable').eq(0).dataTable(options);

  })
}

personInfo.bindEvent[0] = function () {
  $(".nocturnalAbnormalActivityTable").each(function (index,item){
    $(item).on("click","td.address",function(){//给tr或者td添加click事件
      var trDom=$(this).parent()[0]
      var data=personInfo.tables[0][index].api().row(this).data();//获取值的对象数据
      getRenterListAndHouseMaster(data)
    })

    $(item).on("click","td.ta",function(){//给tr或者td添加click事件
      var trDom=$(this).parent()[0]
      var data=personInfo.tables[0][index].api().row(this).data();//获取值的对象数据
      console.log(data);
        getRenterListAndHouseMaster2(data)
    })
  })
}
